#include<stdio.h>
#pragma warning(disable:4996)
int main()
{
	int x = 0;
	scanf("%d", &x);
	for (x = 2; x < 100; x++)
	{
		int i = 2;
		int isprime = 1;
		for (i = 2; i < x; i++)
		if (x % i == 0){ isprime = 0; }
		break;
		if (isprime = 1){ printf("%d", x); }
		
		
	}
	printf("%d", x);
	return 0;
}